package com.yhao.stock.mapper;

import com.yhao.stock.common.dto.AnalysisModel;
import com.yhao.stock.entity.HisData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 历史交易数据 Mapper 接口
 * </p>
 *
 * @author yhao
 * @since 2023-11-09
 */
@Repository
public interface HisDataMapper extends BaseMapper<HisData> {

    @Select("select final_price from his_data where d_name = #{dCode} and d_date >= #{startDate} and d_date < #{endDate} ORDER BY d_date asc")
    List<BigDecimal> getPVData(String dCode, String startDate, String endDate);

    @Select("select * from his_data where d_name = #{dCode} and d_date >= #{startDate} and d_date < #{endDate} ORDER BY d_date asc")
    List<HisData> getDataList(String dCode, String startDate, String endDate);




}
